package edu.unf.cen6940.web;

import org.junit.Test;

import org.junit.runner.RunWith;

import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.beans.factory.support.DefaultListableBeanFactory;

import org.springframework.context.ApplicationContext;

import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;

import org.springframework.test.context.ContextConfiguration;

import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.RequestScope;
import org.springframework.web.context.request.ServletRequestAttributes;
import org.springframework.web.context.request.SessionScope;

/**
 * Unit test for the <code>ResearchkeywordController</code> controller.
 *
 * @see edu.unf.cen6940.web.ResearchkeywordController
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {
		"file:./resources/rms_test-security-context.xml",
		"file:./resources/rms_test-service-context.xml",
		"file:./resources/rms_test-dao-context.xml",
		"file:./resources/rms_test-web-context.xml" })
public class ResearchkeywordControllerTest {
	/**
	 * The Spring application context.
	 *
	 */
	private ApplicationContext context;

	/**
	 * Test <code>editResearchkeywordFacultyresearchs()</code>.
	 */
	@Test
	@SuppressWarnings("unused")
	public void GeteditResearchkeywordFacultyresearchs() throws Exception {
		MockHttpServletRequest request = getMockHttpServletRequest();
		request.setRequestURI("/editResearchkeywordFacultyresearchs");
		MockHttpServletResponse response = getMockHttpServletResponse();

		// Get the singleton controller instance
		ResearchkeywordController controller = (ResearchkeywordController) context.getBean("ResearchkeywordController");

		// TODO Invoke method and Assert return values

	}

	/**
	 * Test <code>newResearchkeywordFacultyresearchs()</code>.
	 */
	@Test
	@SuppressWarnings("unused")
	public void GetnewResearchkeywordFacultyresearchs() throws Exception {
		MockHttpServletRequest request = getMockHttpServletRequest();
		request.setRequestURI("/newResearchkeywordFacultyresearchs");
		MockHttpServletResponse response = getMockHttpServletResponse();

		// Get the singleton controller instance
		ResearchkeywordController controller = (ResearchkeywordController) context.getBean("ResearchkeywordController");

		// TODO Invoke method and Assert return values

	}

	/**
	 * Test <code>saveResearchkeywordFacultyresearchs()</code>.
	 */
	@Test
	@SuppressWarnings("unused")
	public void GetsaveResearchkeywordFacultyresearchs() throws Exception {
		MockHttpServletRequest request = getMockHttpServletRequest();
		request.setRequestURI("/saveResearchkeywordFacultyresearchs");
		MockHttpServletResponse response = getMockHttpServletResponse();

		// Get the singleton controller instance
		ResearchkeywordController controller = (ResearchkeywordController) context.getBean("ResearchkeywordController");

		// TODO Invoke method and Assert return values

	}

	/**
	 * Test <code>confirmDeleteResearchkeywordFacultyresearchs()</code>.
	 */
	@Test
	@SuppressWarnings("unused")
	public void GetconfirmDeleteResearchkeywordFacultyresearchs() throws Exception {
		MockHttpServletRequest request = getMockHttpServletRequest();
		request.setRequestURI("/confirmDeleteResearchkeywordFacultyresearchs");
		MockHttpServletResponse response = getMockHttpServletResponse();

		// Get the singleton controller instance
		ResearchkeywordController controller = (ResearchkeywordController) context.getBean("ResearchkeywordController");

		// TODO Invoke method and Assert return values

	}

	/**
	 * Test <code>deleteResearchkeywordFacultyresearchs()</code>.
	 */
	@Test
	@SuppressWarnings("unused")
	public void GetdeleteResearchkeywordFacultyresearchs() throws Exception {
		MockHttpServletRequest request = getMockHttpServletRequest();
		request.setRequestURI("/deleteResearchkeywordFacultyresearchs");
		MockHttpServletResponse response = getMockHttpServletResponse();

		// Get the singleton controller instance
		ResearchkeywordController controller = (ResearchkeywordController) context.getBean("ResearchkeywordController");

		// TODO Invoke method and Assert return values

	}

	/**
	 * Test <code>selectResearchkeywordFacultyresearchs()</code>.
	 */
	@Test
	@SuppressWarnings("unused")
	public void GetselectResearchkeywordFacultyresearchs() throws Exception {
		MockHttpServletRequest request = getMockHttpServletRequest();
		request.setRequestURI("/selectResearchkeywordFacultyresearchs");
		MockHttpServletResponse response = getMockHttpServletResponse();

		// Get the singleton controller instance
		ResearchkeywordController controller = (ResearchkeywordController) context.getBean("ResearchkeywordController");

		// TODO Invoke method and Assert return values

	}

	/**
	 * Test <code>listResearchkeywordFacultyresearchs()</code>.
	 */
	@Test
	@SuppressWarnings("unused")
	public void GetlistResearchkeywordFacultyresearchs() throws Exception {
		MockHttpServletRequest request = getMockHttpServletRequest();
		request.setRequestURI("/listResearchkeywordFacultyresearchs");
		MockHttpServletResponse response = getMockHttpServletResponse();

		// Get the singleton controller instance
		ResearchkeywordController controller = (ResearchkeywordController) context.getBean("ResearchkeywordController");

		// TODO Invoke method and Assert return values

	}

	/**
	 * Test <code>indexResearchkeyword()</code>.
	 */
	@Test
	@SuppressWarnings("unused")
	public void GetindexResearchkeyword() throws Exception {
		MockHttpServletRequest request = getMockHttpServletRequest();
		request.setRequestURI("/indexResearchkeyword");
		MockHttpServletResponse response = getMockHttpServletResponse();

		// Get the singleton controller instance
		ResearchkeywordController controller = (ResearchkeywordController) context.getBean("ResearchkeywordController");

		// TODO Invoke method and Assert return values

	}

	/**
	 * Test <code>selectResearchkeyword()</code>.
	 */
	@Test
	@SuppressWarnings("unused")
	public void GetselectResearchkeyword() throws Exception {
		MockHttpServletRequest request = getMockHttpServletRequest();
		request.setRequestURI("/selectResearchkeyword");
		MockHttpServletResponse response = getMockHttpServletResponse();

		// Get the singleton controller instance
		ResearchkeywordController controller = (ResearchkeywordController) context.getBean("ResearchkeywordController");

		// TODO Invoke method and Assert return values

	}

	/**
	 * Test <code>editResearchkeyword()</code>.
	 */
	@Test
	@SuppressWarnings("unused")
	public void GeteditResearchkeyword() throws Exception {
		MockHttpServletRequest request = getMockHttpServletRequest();
		request.setRequestURI("/editResearchkeyword");
		MockHttpServletResponse response = getMockHttpServletResponse();

		// Get the singleton controller instance
		ResearchkeywordController controller = (ResearchkeywordController) context.getBean("ResearchkeywordController");

		// TODO Invoke method and Assert return values

	}

	/**
	 * Test <code>saveResearchkeyword()</code>.
	 */
	@Test
	@SuppressWarnings("unused")
	public void GetsaveResearchkeyword() throws Exception {
		MockHttpServletRequest request = getMockHttpServletRequest();
		request.setRequestURI("/saveResearchkeyword");
		MockHttpServletResponse response = getMockHttpServletResponse();

		// Get the singleton controller instance
		ResearchkeywordController controller = (ResearchkeywordController) context.getBean("ResearchkeywordController");

		// TODO Invoke method and Assert return values

	}

	/**
	 * Test <code>newResearchkeyword()</code>.
	 */
	@Test
	@SuppressWarnings("unused")
	public void GetnewResearchkeyword() throws Exception {
		MockHttpServletRequest request = getMockHttpServletRequest();
		request.setRequestURI("/newResearchkeyword");
		MockHttpServletResponse response = getMockHttpServletResponse();

		// Get the singleton controller instance
		ResearchkeywordController controller = (ResearchkeywordController) context.getBean("ResearchkeywordController");

		// TODO Invoke method and Assert return values

	}

	/**
	 * Test <code>confirmDeleteResearchkeyword()</code>.
	 */
	@Test
	@SuppressWarnings("unused")
	public void GetconfirmDeleteResearchkeyword() throws Exception {
		MockHttpServletRequest request = getMockHttpServletRequest();
		request.setRequestURI("/confirmDeleteResearchkeyword");
		MockHttpServletResponse response = getMockHttpServletResponse();

		// Get the singleton controller instance
		ResearchkeywordController controller = (ResearchkeywordController) context.getBean("ResearchkeywordController");

		// TODO Invoke method and Assert return values

	}

	/**
	 * Test <code>deleteResearchkeyword()</code>.
	 */
	@Test
	@SuppressWarnings("unused")
	public void GetdeleteResearchkeyword() throws Exception {
		MockHttpServletRequest request = getMockHttpServletRequest();
		request.setRequestURI("/deleteResearchkeyword");
		MockHttpServletResponse response = getMockHttpServletResponse();

		// Get the singleton controller instance
		ResearchkeywordController controller = (ResearchkeywordController) context.getBean("ResearchkeywordController");

		// TODO Invoke method and Assert return values

	}

	/**
	 * Test <code>researchkeywordControllerbinaryaction()</code>.
	 */
	@Test
	@SuppressWarnings("unused")
	public void GetresearchkeywordControllerbinaryaction() throws Exception {
		MockHttpServletRequest request = getMockHttpServletRequest();
		request.setRequestURI("/researchkeywordController/binary.action");
		MockHttpServletResponse response = getMockHttpServletResponse();

		// Get the singleton controller instance
		ResearchkeywordController controller = (ResearchkeywordController) context.getBean("ResearchkeywordController");

		// TODO Invoke method and Assert return values

	}

	/**
	 * Autowired to set the Spring application context.
	 *
	 */
	@Autowired
	public void setContext(ApplicationContext context) {
		this.context = context;
		((DefaultListableBeanFactory) context.getAutowireCapableBeanFactory()).registerScope("session", new SessionScope());
		((DefaultListableBeanFactory) context.getAutowireCapableBeanFactory()).registerScope("request", new RequestScope());
	}

	/**
	 * Returns a mock HttpServletRequest object.
	 *
	 */
	private MockHttpServletRequest getMockHttpServletRequest() {
		MockHttpServletRequest request = new MockHttpServletRequest();
		ServletRequestAttributes attributes = new ServletRequestAttributes(request);
		RequestContextHolder.setRequestAttributes(attributes);
		return request;
	}

	/**
	 * Returns a mock HttpServletResponse object.
	 *
	 */
	private MockHttpServletResponse getMockHttpServletResponse() {
		return new MockHttpServletResponse();
	}
}